/*
 * Middleware
 * Copyright (C) 2010/11
 * Riccardo Pulvirenti, Giuseppe Ravidà, Andrea Tino
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANDABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see http://www.gnu.org/licenses
 */

/*!
 * File: utils.hpp
 */

#ifndef _UTILS_HPP_
#define _UTILS_HPP_

#include <iostream>
#include <string>

//-----------------------------------------------------------------------------
// Functions declarations
namespace middleware {
namespace utils {
/*!
 * Gets an integral random number in string format. This function uses boost
 * Mersenne Twister random number generation.
 * \param min Minimum possible number in the casual set to be generated with
 * a certain probability concordantly with the Mersenne casual variable.
 * \param max Maximum possible number in the casual set to be generated with
 * a certain probability concordantly with the Mersenne casual variable.
 * \return Returns a casual number in the specified range by min and max already
 * converted in string.
 */
std::string GetRandomIntegralNumberStr(int min, int max);
/*!
 * Gets an integral random number. This function uses boost Mersenne Twister
 * random number generation.
 * \param min Minimum possible number in the casual set to be generated with
 * a certain probability concordantly with the Mersenne casual variable.
 * \param max Maximum possible number in the casual set to be generated with
 * a certain probability concordantly with the Mersenne casual variable.
 * \return Returns a casual number in the specified range by min and max.
 */
int GetRandomIntegralNumberInt(int min, int max);
/*!
 * Gets an integral random number. This function uses /etc/ucasual Unix file so
 * it should be used only being sure that the software will be executed
 * under Unix systems. This function is an Orphan. Despite this functionality
 * is provided, it is not implemented.
 * \param max Maximum possible number to be generated.
 * \return The function is supposed to return a number from 0 to (max - 1).
 */
int GetRandomIntegralNumber(unsigned int max);
}
}

#endif
